Page Handling

 START / END / INSERT / SELECT / PAGENO / PAGECOUNT

  

 

START HPDFPAGE:

 

This command is used to add a new page to the HPDFDOC. The added page will be the current page until END HPDFPAGE is called. Please note that, PAGE once added can not be deleted or removed or moved afterwards. This command can be called only after START HPDFDOC.

 

Syntax:

 

START HPDFPAGE

 

Source code example:

 

START HPDFPAGE

 

 

END HPDFPAGE:

 

This command is used to close the current page of the HPDFDOC.

 

Syntax:

 

END HPDFPAGE

 

Source code example:

 

END HPDFPAGE

 

 

INSERT HPDFPAGE:

 

This command is used to insert a new page before the page number specified. The inserted page will be selected as the current page after this command. All the pages will be shifted down. This command can not be called inside a current page selection. Please call END HPDFPAGE to close the current page before calling this command.

 

Syntax:

 

INSERT HPDFPAGE BEFORE PAGE nPage

 

Source code example:

 

INSERT HPDFPAGE BEFORE PAGE 3

 

 

SELECT HPDFPAGE:

 

This command is used to select an existing page as the current page. This command can not be called inside a current page selection. Please call END HPDFPAGE to close the current page before calling this command.

 

Syntax:

 

SELECT HPDFPAGE nPage

 

Source code example:

 

SELECT HPDFPAGE 3

 

 

HMG_HPDF_PAGENO():

 

This function is used to retrieve the current page number. This command shall be called in between the commands START HPDFPAGE and END HPDFPAGE.

 

Syntax:

 

HMG_HPDF_PAGENO() -> nCurrentPage

 

Source code example:

 

nCurrentPage := HMG_HPDF_PageNo()

 

 

HMG_HPDF_PAGECOUNT():

 

This function is used to retrieve the total pages inside the HPDFDOC at the moment.

 

Syntax:

 

HMG_HPDF_PAGECOUNT() -> nTotPages

 

Examples:

 

nTotalPages := HMG_HPDF_PageCount()